<% content_for :title do %>
新用户注册
<% end %>

<div class="user-page">
  <div class="user-title clearfix">
    <span class="logo"></span>
    <p>讲稿网，让智慧流动</p>
  </div>
  <div class="login-wrap">
    <%= render "shared/sign_up_in_tab" %>
    <%= form_for @user, html: { class: "user-info user-register" } do |f| %>
      <% if @user.errors.any? %>
        <div id="error_explanation">
          <h5>以下错误导致用户注册失败：</h5>
          <ul>
            <% @user.errors.full_messages.each do |msg| %>
              <li><%= msg %></li>
            <% end %>
          </ul>
        </div>
      <% end %>
      <div class="form-group">
        <%= f.text_field :name, class: "user-name", placeholder: "用户名", required: true, autofocus: true %>
      </div>
      <div class="form-group">
        <%= f.email_field :email, class: "email", placeholder: "邮箱", required: true %>
      </div>
      <div class="form-group">
        <%= f.password_field :password, class: "password", placeholder: "密码", required: true %>
      </div>
      <div class="form-group">
        <%= f.password_field :password_confirmation, class: "confirm-password", placeholder: "确认密码", required: true %>
      </div>
      <div class="form-group">
        <%= f.text_area :bio, class: "user-bio", placeholder: "个人简介及使用本网站的简要原因", required: true, resize: false %>
      </div>
      <%= f.button "注册", class: 'register-btn btn-default' %>
    <% end %>
  </div>
  <div class="user-register-tips pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
    <p>* 本网站目前处于内测阶段，新注册用户需要填写个人简介及使用本网站的简要原因，待管理员审核通过后方可正常登录使用本网站提供的服务。</p>
  </div>
</div>
